package github.pop.ares;

import github.pop.ares.block.BlockRegistry;
import github.pop.ares.block.TileEntityTypeRegistry;
import github.pop.ares.entity.EntityTypeRegistry;
import github.pop.ares.event.AreasForgeEventHandler;
import github.pop.ares.item.ItemRegister;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod(Utils.MOD_ID)
public class Areas {


    public Areas() {
        // Register the setup method for modloading
        // mod总线
//        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(new AreasForgeEventHandler());

        final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
        ItemRegister.register(modEventBus);

//
        BlockRegistry.register(modEventBus);
        // dont be forget add to modBus
        TileEntityTypeRegistry.register(modEventBus);

        // custom entity register modBus
        EntityTypeRegistry.register(modEventBus);
    }
}
